Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More efficient WP_User_Query with count_total=false #781

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

mattwiebe
Copy link
Contributor

We have some extra protections on dotcom for counting users in User queries, since we have a lot of users. Since we don't the total count anyway, we can make our query more efficient for everyone by skipping it :)

Proposed changes:

  • Add count_total => false to our WP_User_Query instances

@mattwiebe mattwiebe requested a review from pfefferle June 10, 2024 16:01
@mattwiebe mattwiebe self-assigned this Jun 10, 2024
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point! thanks!

@mattwiebe mattwiebe merged commit a08b333 into master Jun 11, 2024
21 checks passed
@mattwiebe mattwiebe deleted the fix/no-count-total-for-user-query branch June 11, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants